Optimal. Leaf size=209 \[ \frac {a^{5/2} (163 A+200 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{64 d}+\frac {a^3 (163 A+200 B) \tan (c+d x)}{64 d \sqrt {a+a \cos (c+d x)}}+\frac {a^3 (95 A+104 B) \sec (c+d x) \tan (c+d x)}{96 d \sqrt {a+a \cos (c+d x)}}+\frac {a^2 (11 A+8 B) \sqrt {a+a \cos (c+d x)} \sec ^2(c+d x) \tan (c+d x)}{24 d}+\frac {a A (a+a \cos (c+d x))^{3/2} \sec ^3(c+d x) \tan (c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.39, antiderivative size = 209, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {3054, 3059,
2851, 2852, 212} \begin {gather*} \frac {a^{5/2} (163 A+200 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{64 d}+\frac {a^3 (163 A+200 B) \tan (c+d x)}{64 d \sqrt {a \cos (c+d x)+a}}+\frac {a^3 (95 A+104 B) \tan (c+d x) \sec (c+d x)}{96 d \sqrt {a \cos (c+d x)+a}}+\frac {a^2 (11 A+8 B) \tan (c+d x) \sec ^2(c+d x) \sqrt {a \cos (c+d x)+a}}{24 d}+\frac {a A \tan (c+d x) \sec ^3(c+d x) (a \cos (c+d x)+a)^{3/2}}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2851
Rule 2852
Rule 3054
Rule 3059
Rubi steps
\begin {align*} \int (a+a \cos (c+d x))^{5/2} (A+B \cos (c+d x)) \sec ^5(c+d x) \, dx &=\frac {a A (a+a \cos (c+d x))^{3/2} \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {1}{4} \int (a+a \cos (c+d x))^{3/2} \left (\frac {1}{2} a (11 A+8 B)+\frac {1}{2} a (3 A+8 B) \cos (c+d x)\right ) \sec ^4(c+d x) \, dx\\ &=\frac {a^2 (11 A+8 B) \sqrt {a+a \cos (c+d x)} \sec ^2(c+d x) \tan (c+d x)}{24 d}+\frac {a A (a+a \cos (c+d x))^{3/2} \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {1}{12} \int \sqrt {a+a \cos (c+d x)} \left (\frac {1}{4} a^2 (95 A+104 B)+\frac {3}{4} a^2 (17 A+24 B) \cos (c+d x)\right ) \sec ^3(c+d x) \, dx\\ &=\frac {a^3 (95 A+104 B) \sec (c+d x) \tan (c+d x)}{96 d \sqrt {a+a \cos (c+d x)}}+\frac {a^2 (11 A+8 B) \sqrt {a+a \cos (c+d x)} \sec ^2(c+d x) \tan (c+d x)}{24 d}+\frac {a A (a+a \cos (c+d x))^{3/2} \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {1}{64} \left (a^2 (163 A+200 B)\right ) \int \sqrt {a+a \cos (c+d x)} \sec ^2(c+d x) \, dx\\ &=\frac {a^3 (163 A+200 B) \tan (c+d x)}{64 d \sqrt {a+a \cos (c+d x)}}+\frac {a^3 (95 A+104 B) \sec (c+d x) \tan (c+d x)}{96 d \sqrt {a+a \cos (c+d x)}}+\frac {a^2 (11 A+8 B) \sqrt {a+a \cos (c+d x)} \sec ^2(c+d x) \tan (c+d x)}{24 d}+\frac {a A (a+a \cos (c+d x))^{3/2} \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {1}{128} \left (a^2 (163 A+200 B)\right ) \int \sqrt {a+a \cos (c+d x)} \sec (c+d x) \, dx\\ &=\frac {a^3 (163 A+200 B) \tan (c+d x)}{64 d \sqrt {a+a \cos (c+d x)}}+\frac {a^3 (95 A+104 B) \sec (c+d x) \tan (c+d x)}{96 d \sqrt {a+a \cos (c+d x)}}+\frac {a^2 (11 A+8 B) \sqrt {a+a \cos (c+d x)} \sec ^2(c+d x) \tan (c+d x)}{24 d}+\frac {a A (a+a \cos (c+d x))^{3/2} \sec ^3(c+d x) \tan (c+d x)}{4 d}-\frac {\left (a^3 (163 A+200 B)\right ) \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{64 d}\\ &=\frac {a^{5/2} (163 A+200 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{64 d}+\frac {a^3 (163 A+200 B) \tan (c+d x)}{64 d \sqrt {a+a \cos (c+d x)}}+\frac {a^3 (95 A+104 B) \sec (c+d x) \tan (c+d x)}{96 d \sqrt {a+a \cos (c+d x)}}+\frac {a^2 (11 A+8 B) \sqrt {a+a \cos (c+d x)} \sec ^2(c+d x) \tan (c+d x)}{24 d}+\frac {a A (a+a \cos (c+d x))^{3/2} \sec ^3(c+d x) \tan (c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.77, size = 152, normalized size = 0.73 \begin {gather*} \frac {a^2 \sqrt {a (1+\cos (c+d x))} \sec \left (\frac {1}{2} (c+d x)\right ) \sec ^4(c+d x) \left (6 \sqrt {2} (163 A+200 B) \tanh ^{-1}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \cos ^4(c+d x)+(844 A+544 B+(2203 A+2056 B) \cos (c+d x)+(652 A+544 B) \cos (2 (c+d x))+489 A \cos (3 (c+d x))+600 B \cos (3 (c+d x))) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{768 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1649\) vs.
\(2(185)=370\).
time = 0.48, size = 1650, normalized size = 7.89
method | result | size |
default | \(\text {Expression too large to display}\) | \(1650\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 232, normalized size = 1.11 \begin {gather*} \frac {3 \, {\left ({\left (163 \, A + 200 \, B\right )} a^{2} \cos \left (d x + c\right )^{5} + {\left (163 \, A + 200 \, B\right )} a^{2} \cos \left (d x + c\right )^{4}\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - 4 \, \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) + 4 \, {\left (3 \, {\left (163 \, A + 200 \, B\right )} a^{2} \cos \left (d x + c\right )^{3} + 2 \, {\left (163 \, A + 136 \, B\right )} a^{2} \cos \left (d x + c\right )^{2} + 8 \, {\left (23 \, A + 8 \, B\right )} a^{2} \cos \left (d x + c\right ) + 48 \, A a^{2}\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{768 \, {\left (d \cos \left (d x + c\right )^{5} + d \cos \left (d x + c\right )^{4}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.91, size = 322, normalized size = 1.54 \begin {gather*} -\frac {\sqrt {2} {\left (3 \, \sqrt {2} {\left (163 \, A a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 200 \, B a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}\right ) + \frac {4 \, {\left (3912 \, A a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 4800 \, B a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 7172 \, A a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 8288 \, B a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4606 \, A a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4816 \, B a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 1047 \, A a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 936 \, B a^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}\right )} \sqrt {a}}{768 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (A+B\,\cos \left (c+d\,x\right )\right )\,{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{5/2}}{{\cos \left (c+d\,x\right )}^5} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________